package com.dsg.controller.account;


import com.dsg.aspect.NoRepeatSubmit;
import com.dsg.common.constants.MessageConstants;
import com.dsg.common.dto.AjaxResult;
import com.dsg.controller.base.BaseController;
import com.dsg.entity.account.DsgAccountCheckSection;
import com.dsg.service.account.IDsgAccountCheckSectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 开票号段 前端控制器
 * </p>
 *
 * @author system
 * @since 2020-07-15
 */
@RestController
@RequestMapping("/account/dsgAccountCheckSection")
@Api(description = "开票号段")
public class DsgAccountCheckSectionController extends BaseController {

    @Autowired
    private IDsgAccountCheckSectionService dsgAccountCheckSectionService;

    /**
     * 批量插入支票號碼段
     *
     * @param dsgAccountCheckSection
     * @return
     */
    @NoRepeatSubmit
    @PutMapping(value = "/add")
    @ApiOperation("批量插入支票號碼段")
    public AjaxResult add(@RequestBody DsgAccountCheckSection dsgAccountCheckSection) {
        dsgAccountCheckSectionService.add(dsgAccountCheckSection);
        return result(MessageConstants.SSO_STATUS_SUCCESS);
    }
}
